#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,sum=0;
	cin>>n;
	do
	{
		if(n%10%2==0)
		sum+=n%10;
		n=n/10;
	}
	while(n!=0);
	cout<<sum;
    return 0;
}

